using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._BusinessAnalystTools._TradeAreas
{
    /// <summary>
    /// <para>Generate Geographies From Overlay</para>
    /// <para>Generates trade areas from the features of an input standard geography level that has a specified spatial relationship with the input.</para>
    /// <para>根据与输入具有指定空间关系的输入标准地理级别的要素生成贸易区。</para>
    /// </summary>    
    [DisplayName("Generate Geographies From Overlay")]
    public class GenerateGeographiesFromOverlay : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateGeographiesFromOverlay()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_geography_level">
        /// <para>Geography Level</para>
        /// <para>The geography level that will be used to define the trade area.</para>
        /// <para>将用于定义贸易区的地理级别。</para>
        /// </param>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The features used to extract the standard geography level features by the specified spatial relationship. It can be either all features from the layer or only those selected once a selection is available.</para>
        /// <para>用于按指定空间关系提取标准地理级别要素的要素。它可以是图层中的所有要素，也可以是仅在选择可用时选择的要素。</para>
        /// </param>
        /// <param name="_id_field">
        /// <para>ID Field</para>
        /// <para>The field used to identify the Input Features parameter—for example, the IDs of drive time polygons.</para>
        /// <para>用于标识输入要素参数的字段，例如，行驶时间面的 ID。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output feature containing the trade area.</para>
        /// <para>包含贸易区的输出要素。</para>
        /// </param>
        public GenerateGeographiesFromOverlay(object _geography_level, object _in_features, object _id_field, object _out_feature_class)
        {
            this._geography_level = _geography_level;
            this._in_features = _in_features;
            this._id_field = _id_field;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Business Analyst Tools";

        public override string ToolName => "Generate Geographies From Overlay";

        public override string CallName => "ba.GenerateGeographiesFromOverlay";

        public override List<string> AcceptEnvironments => ["baDataSource", "workspace"];

        public override object[] ParameterInfo => [_geography_level, _in_features, _id_field, _out_feature_class, _overlap_type.GetGPValue(), _ratios.GetGPValue()];

        /// <summary>
        /// <para>Geography Level</para>
        /// <para>The geography level that will be used to define the trade area.</para>
        /// <para>将用于定义贸易区的地理级别。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Geography Level")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _geography_level { get; set; }


        /// <summary>
        /// <para>Input Features</para>
        /// <para>The features used to extract the standard geography level features by the specified spatial relationship. It can be either all features from the layer or only those selected once a selection is available.</para>
        /// <para>用于按指定空间关系提取标准地理级别要素的要素。它可以是图层中的所有要素，也可以是仅在选择可用时选择的要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>ID Field</para>
        /// <para>The field used to identify the Input Features parameter—for example, the IDs of drive time polygons.</para>
        /// <para>用于标识输入要素参数的字段，例如，行驶时间面的 ID。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _id_field { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature containing the trade area.</para>
        /// <para>包含贸易区的输出要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Relationship</para>
        /// <para><xdoc>
        ///   <para>Specifies how the subgeography will be selected from the boundary layer.</para>
        ///   <bulletList>
        ///     <bullet_item>Intersect—If any of the subgeography features touch or intersect the boundary layer, they will be included in the output layer. This is the default.</bullet_item><para/>
        ///     <bullet_item>Have their center in—If the centroids of any of the subgeography features are contained within the boundary layer, they will be included in the output layer.</bullet_item><para/>
        ///     <bullet_item>Completely within—Only the features of the subgeography layer that are completely contained within the boundary layer will be included in the output layer.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何从边界图层中选择子地理。</para>
        ///   <bulletList>
        ///     <bullet_item>相交 - 如果任何次地理要素与边界图层接触或相交，则这些要素将包含在输出图层中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>中心位于 - 如果任何次地理要素的质心包含在边界图层中，则这些要素将包含在输出图层中。</bullet_item><para/>
        ///     <bullet_item>完全在内 - 输出图层中将仅包含完全包含在边界图层中的次地理图层要素。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Relationship")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _overlap_type_value _overlap_type { get; set; } = _overlap_type_value._INTERSECT;

        public enum _overlap_type_value
        {
            /// <summary>
            /// <para>Intersect</para>
            /// <para>Intersect—If any of the subgeography features touch or intersect the boundary layer, they will be included in the output layer. This is the default.</para>
            /// <para>相交 - 如果任何次地理要素与边界图层接触或相交，则这些要素将包含在输出图层中。这是默认设置。</para>
            /// </summary>
            [Description("Intersect")]
            [GPEnumValue("INTERSECT")]
            _INTERSECT,

            /// <summary>
            /// <para>Have their center in</para>
            /// <para>Have their center in—If the centroids of any of the subgeography features are contained within the boundary layer, they will be included in the output layer.</para>
            /// <para>中心位于 - 如果任何次地理要素的质心包含在边界图层中，则这些要素将包含在输出图层中。</para>
            /// </summary>
            [Description("Have their center in")]
            [GPEnumValue("CENTROID_WITHIN")]
            _CENTROID_WITHIN,

            /// <summary>
            /// <para>Completely within</para>
            /// <para>Completely within—Only the features of the subgeography layer that are completely contained within the boundary layer will be included in the output layer.</para>
            /// <para>完全在内 - 输出图层中将仅包含完全包含在边界图层中的次地理图层要素。</para>
            /// </summary>
            [Description("Completely within")]
            [GPEnumValue("COMPLETELY_WITHIN")]
            _COMPLETELY_WITHIN,

        }

        /// <summary>
        /// <para>Ratios</para>
        /// <para><xdoc>
        ///   <para>Specifies the ratios to be calculated.</para>
        ///   <bulletList>
        ///     <bullet_item>No ratios—No ratios will be implemented. This is the default.</bullet_item><para/>
        ///     <bullet_item>Area only—Only the ratios within the portion (area) of the standard geography level that intersects an input feature will be implemented.</bullet_item><para/>
        ///     <bullet_item>All ratios—All available ratios will be implemented. This option is not available when using online data.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要计算的比率。</para>
        ///   <bulletList>
        ///     <bullet_item>无比率—将不实施任何比率。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>仅面积 - 仅实施标准地理级别中与输入要素相交的部分（面积）内的比率。</bullet_item><para/>
        ///     <bullet_item>所有比率—将实施所有可用比率。使用联机数据时，此选项不可用。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Ratios")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _ratios_value _ratios { get; set; } = _ratios_value._NO_RATIOS;

        public enum _ratios_value
        {
            /// <summary>
            /// <para>No ratios</para>
            /// <para>No ratios—No ratios will be implemented. This is the default.</para>
            /// <para>无比率—将不实施任何比率。这是默认设置。</para>
            /// </summary>
            [Description("No ratios")]
            [GPEnumValue("NO_RATIOS")]
            _NO_RATIOS,

            /// <summary>
            /// <para>Area only</para>
            /// <para>Area only—Only the ratios within the portion (area) of the standard geography level that intersects an input feature will be implemented.</para>
            /// <para>仅面积 - 仅实施标准地理级别中与输入要素相交的部分（面积）内的比率。</para>
            /// </summary>
            [Description("Area only")]
            [GPEnumValue("AREA_ONLY")]
            _AREA_ONLY,

            /// <summary>
            /// <para>All ratios</para>
            /// <para>All ratios—All available ratios will be implemented. This option is not available when using online data.</para>
            /// <para>所有比率—将实施所有可用比率。使用联机数据时，此选项不可用。</para>
            /// </summary>
            [Description("All ratios")]
            [GPEnumValue("ALL_RATIOS")]
            _ALL_RATIOS,

        }

        public GenerateGeographiesFromOverlay SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}